package org.budo.phone.api.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.budo.phone.api.CallCenterAgent;

/**
 * @author lmw
 */
public class CallCenterAgentUtil {
    public static List<String> toSimpleString(Map<String, Object> agents) {
        if (null == agents) {
            return null;
        }

        List<String> list = new ArrayList<String>();
        for (Object each : agents.values()) {
            CallCenterAgent agent = (CallCenterAgent) each;
            list.add(agent.getName() + " : " + agent.getStatus() + " : " + agent.getState());
        }
        return list;
    }
}